<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app-4">
        学号：{{stu.stuNum}} <br />
        姓名：{{stu.stuName}} <br />
        性别：
        <label v-if="stu.stuGender == 'M'">
            男
        </label>
        <label v-if="stu.stuGender == 'F'">
            女
        </label>
        <br />
        年龄：{{stu.stuAge}}

    </div>

    <script type="text/javascript">
        var vm = new Vue({
            el: '#app-4',
            data: {
                stu: {
                    stuNum: '10001',
                    stuName: '张三',
                    stuGender: 'M',
                    stuAge: 20
                }
            }
        })

    </script>
</body>
</html>




